package com.hopes.bizz.hazard.common.service;

import com.hopes.bizz.hazard.setting.mapper.HazBasicFactorConfigMapper;
import com.hopes.bizz.hazard.setting.mapper.HazBasicRtuConfigMapper;
import com.hopes.boss.admin.api.entity.SysDictItem;
import com.hopes.boss.common.service.TableDictService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author daijie
 * @version 1.0
 * @date 2023/10/27 14:22
 * @Description:
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class HazardDictServiceImpl implements TableDictService {

    /**
     * 数采仪
     */
    private final HazBasicRtuConfigMapper hazBasicRtuConfigMapper;

    /**
     * 监控因子
     */
    private final HazBasicFactorConfigMapper hazBasicFactorConfigMapper;


    /**
     * 数采仪
     * @return  字典数据
     */
    public List<SysDictItem> listRtuAsDict() {
        return hazBasicRtuConfigMapper.labelValueList();
    }

    /**
     * 监控因子
     * @return 字典数据
     */
    public List<SysDictItem> listFactorConfigAsDict() {
        return hazBasicFactorConfigMapper.labelValueList();
    }
}
